﻿using Minecraft.Config.Csv.CsvCom;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Minecraft.Config.Csv.CsvCls
{
	public partial class Mod_Compositing
	{
		/// <summary>
		/// 需要的配方
		/// </summary>
		public List<ModRecipeInfo> modRecipeInfoList_Convert
		{
			get
			{
				List<ModRecipeInfo> modRecipeInfoList = new List<ModRecipeInfo>();
				var strs = Recipe.Split(new char[] { '+' }, StringSplitOptions.RemoveEmptyEntries);
				foreach (var str in strs)
				{
					var recipes = str.Split(new char[] { '*' }, StringSplitOptions.RemoveEmptyEntries);

					ModRecipeInfo modRecipeInfo = new ModRecipeInfo()
					{
						GoodsItemId = recipes[0],
						Num = int.Parse(recipes[1])
					};
					modRecipeInfoList.Add(modRecipeInfo);
				}
				return modRecipeInfoList;
			}
		}
	}
}
